package org.example.springai_deepseek.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class AppStartupRunner implements ApplicationRunner {

    @Value("${spring.ai.openai.api-key}")
    private String apiKey;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        // 应用启动后执行
        System.out.println("应用已启动，DeepSeek API KEY:" + apiKey);
    }
}